<div class="menu">
	<div align="right" style="font-weight:bold; font-size:12px; padding-bottom:8px; color:#318002;">
		<?php echo $this->Access->getMyRole($this->Access->getMy('group_id')).": ".$this->Access->getMy('nombre_completo');?>
	</div>
	<?php  $this->Form->cuenta($this->Access->getMy('id'));?>	
	<div class="desplegable">
		<?php  $this->Form->menu($this->Access->getMy('id'),$this->Access->getMy('group_id'));?>
	</div>
</div>
<?php
	echo $javascript->link('prototype.js',false);
	echo $javascript->link('scriptaculous.js?load=effects',false);	
?>
<div class="participantes index">
	<fieldset>
	<legend><?php __('Equipo Multiplicador - Taller');?></legend>
	<?php echo $ajax->div('participantes'); ?>
	<table class="tabla_formulario">
		<tr>
			<th>Rol</th>
			<th>Nombre</th>
			<th>Cargo</th>
			<th>Correo</th>
			<th>Tel&eacute;fono</th>
			<th>Acciones</th>
		</tr>
		<?php foreach ($participantes as $pariticipante): ?>
		<tr class="tabla_formulario">
			<td><?php echo $pariticipante['Actore']['nombre']; ?></td>
			<td><?php echo $pariticipante['Participante']['nombre']; ?></td>
			<td><?php echo $pariticipante['Participante']['cargo']; ?></td>
			<td><?php echo $pariticipante['Participante']['correo']; ?></td>
			<td><?php echo $pariticipante['Participante']['telefono']; ?></td>						
			<td>
				<?php  echo $this->Html->link($this->Html->image('delete.png', array('alt'=> __('Eliminar', true), 'border' => '0')),
										'delete/'.$pariticipante['Participante']['id']."/".$taller.'/'.$et,
										array('escape' => false, 'title'=>'Eliminar Experiencia'), 
										sprintf(__('Esta seguro de eliminar: %s?', true), $pariticipante['Participante']['nombre'])); ?>
			</td>
		</tr>
		<?php endforeach; ?>
	</table>
		<?php echo $ajax->divEnd('participantes'); ?> <br />
	
		<?php echo $ajax->form('/add', 'post', array('update' => 'participantes')); ?>
			<table class="tabla_formulario">
				<tr>
					<td><?php echo $form->input('nombre');?></td>			
					<td><?php echo $form->input('cargo');?></td>
				</tr>				
				<tr>
					<td><?php echo $form->input('telefono');?></td>
					<td><?php echo $form->input('correo');?></td>
				</tr>
				<tr>						
					
					<td><?php echo $form->input('estadocivil', array('label'=>'Estado Civil',
									'options'=>array('Soltero'=>'Soltero', 'Casado'=>'Casado', 'Union Libre'=>'Union Libre', 'Viudo'=>'Viudo')));?>
					</td>
					<td><?php echo $form->input('actore_id', array('label'=>'Rol',
									'options'=>$actores, 'id'=>'actor', 'onChange'=>"educacion(this.value)"));?>
					</td>								
				</tr>
				<tr>
					<td><?php echo $form->input('instituciones_educativa_id', array('label'=>'Institucion Educativa',
									'options'=>$ies, 'disabled'=>true, 'id'=>'ie'));?>
					</td>
					<td><?php echo $form->input('telefono_institucion_educativa', array('disabled'=>true, 'id'=>'tel_ie'));?>
					</td>
					<?php echo $form->input('fase',array('type'=>'hidden','value'=>'Proceso de Capacitacion'));?>
					<?php 
						// Este solo cuando sea Taller
						  echo $form->input('tallere_id',array('type'=>'hidden','value'=>$taller));
						  echo $form->input('et',array('type'=>'hidden','value'=>$et));?>							
				</tr>
				<tr>
					<td colspan="2"><?php echo $form->submit('A&ntilde;adir',array('escape'=>false));?></td>
				</tr>
			</table>
		<?php echo $form->end();?>
		</fieldset>
</div>
<script>
	function educacion($actor){
		if($actor!="1"){
			document.getElementById('tel_ie').disabled=false;			
			document.getElementById('ie').disabled=false;
		}else{
			document.getElementById('tel_ie').value="";
			document.getElementById('tel_ie').disabled=true;
			document.getElementById('ie').disabled=true;
			
		}
		
	}
</script>